﻿/*********************************************************************************
**                                                                              **
**  Copyright (C) 2019-2023 LiLong                                              **
**  This file is part of QCustomUi.                                             **
**                                                                              **
**  QCustomUi is free software: you can redistribute it and/or modify           **
**  it under the terms of the GNU Lesser General Public License as published by **
**  the Free Software Foundation, either version 3 of the License, or           **
**  (at your option) any later version.                                         **
**                                                                              **
**  QCustomUi is distributed in the hope that it will be useful,                **
**  but WITHOUT ANY WARRANTY; without even the implied warranty of              **
**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               **
**  GNU Lesser General Public License for more details.                         **
**                                                                              **
**  You should have received a copy of the GNU Lesser General Public License    **
**  along with QCustomUi.  If not, see <https://www.gnu.org/licenses/>.         **
**********************************************************************************/

*
{
    font-family: 'Microsoft YaHei';
    outline: none;
}
/************************QPushButton********************/
QPushButton
{
    min-height: 27px;
    background: #E1E1E1;
    border: 1px solid #ADADAD;
    font-weight: 400;
}

QPushButton:hover
{
    background: #E1F0FF;
    border: 1px solid #8EBDED;
}

QPushButton:focus
{
    border: 2px solid #8EBDED;
}

QPushButton:pressed, QPushButton:checked
{
    background: #CBE5FF;
    border: 1px solid #2477CE;
}

QPushButton:disabled
{
    background: #E1E1E1;
    border: 1px solid #D2D2D2;
    color: #AAAAAA;
}

QPushButton[text]
{
    padding-left: 15px;
    padding-right: 15px;
}

/************************QComboBox********************/
QComboBox
{
    background: #FFFFFF;
    border: 1px solid #999999;
}

QComboBox:hover
{
    border: 1px solid #2477CE;
}

QComboBox:disabled
{
    background: #D2D2D2;
    border: 1px solid #E1E1E1;
    color: #AAAAAA;
}

QComboBox::drop-down
{
    background: transparent;
    border: none;
}

QComboBox::drop-down:hover
{
    background: #CBE5FF;
    border-left: 1px solid #2477CE;
}

QComboBox::drop-down:pressed
{
    background: #2477CE;
}

QComboBox::down-arrow
{
    image: url(:/QComboBox/Resources/QComboBox/down-arrow.png);
}

QComboBox::down-arrow:pressed
{
    image: url(:/QComboBox/Resources/QComboBox/down-arrow-pressed.png);
}

QComboBox::down-arrow:disabled
{
    image: url(:/QComboBox/Resources/QComboBox/down-arrow-disabled.png);
}

QComboBox QListView
{
    background: #F6F6F6;
}

QComboBox QListView::item
{
    padding-left: 5px;
    height: 21px;
    background: transparent;
}

QComboBox QListView::item:selected
{
    color: #1E1E1E;
}

QComboBox QListView
{
    selection-background-color: #CBE5FF;
}
/***********************QLineEdit***********************/
QLineEdit
{
    background: #FFFFFF;
    border: 1px solid #999999;
}

QLineEdit:hover
{
    border: 1px solid #2477CE;
}

QLineEdit:focus
{
    border: 1px solid #2477CE;
}

QLineEdit:disabled
{
    color: #AAAAAA;
    border: 1px solid #E1E1E1;
    background: #D2D2D2;
}
/**************************QSpinBox***********************/

QSpinBox, QDoubleSpinBox
{
    qproperty-alignment: 'AlignHCenter | AlignVCenter';
    font-weight: 400;
    background: #FFFFFF;
    border: 1px solid #999999;
}

QSpinBox:hover, QSpinBox:focus, QDoubleSpinBox:hover, QDoubleSpinBox:focus
{
    border: 1px solid #2477CE;
}

QSpinBox:disabled, QDoubleSpinBox:disabled
{
    background: #E1E1E1;
    border: 1px solid #D2D2D2;
    color: #AAAAAA;
}

QSpinBox::up-button, QDoubleSpinBox::up-button
{
    background: transparent;
    /*subcontrol-position: right;*/
    border: none;
}

QSpinBox::down-button, QDoubleSpinBox::down-button
{
    background: transparent;
    /*subcontrol-position: left;*/
    border: none;
}

QSpinBox::up-button:hover, QDoubleSpinBox::up-button:hover
{
    background: #CBE5FF;
    border-left: 1px solid #2477CE;
    border-bottom: 1px solid #2477CE;
}

QSpinBox::down-button:hover, QDoubleSpinBox::down-button:hover
{
    background: #CBE5FF;
    border-left: 1px solid #2477CE;
    border-top: 1px solid #2477CE;
}

QSpinBox::up-button:pressed, QSpinBox::down-button:pressed, QDoubleSpinBox::up-button:pressed, QDoubleSpinBox::down-button:pressed
{
    background: #2477CE;
}

QSpinBox::up-arrow, QDoubleSpinBox::up-arrow
{
    image: url(:/QSpinBox/Resources/QSpinBox/up-button.png);
}

QSpinBox::down-arrow, QDoubleSpinBox::down-arrow
{
    image: url(:/QSpinBox/Resources/QSpinBox/down-button.png);
}

QSpinBox::up-arrow:pressed, QDoubleSpinBox::up-arrow:pressed
{
    image: url(:/QSpinBox/Resources/QSpinBox/up-button-pressed.png);
}

QSpinBox::down-arrow:pressed, QDoubleSpinBox::down-arrow:pressed
{
    image: url(:/QSpinBox/Resources/QSpinBox/down-button-pressed.png);
}

QSpinBox::up-arrow:disabled, QDoubleSpinBox::up-arrow:disabled
{
    image: url(:/QSpinBox/Resources/QSpinBox/up-button-disabled.png);
}

QSpinBox::down-arrow:disabled, QDoubleSpinBox::down-arrow:disabled
{
    image: url(:/QSpinBox/Resources/QSpinBox/down-button-disabled.png);
}

/*****************************QMenu*******************************/
QMenu
{
    background: #F6F6F6;
    border: 1px solid #D8D9E2;
}

QMenu::item
{
    background: transparent;
}

QMenu::item:selected
{
    background: #CBE5FF;
    color: #1e1e1e;
}

QMenu::item:pressed
{
    background: #2477CE;
    color: #FFFFFF;
}

QMenu::item:disabled
{
    color: #AAAAAA;
}

QMenu::separator
{
    height: 1px;
    background: #E0E3E6;
    margin-left: 10px;
    margin-right: 5px;
}

/**************************QScrollBar**********************************/

QScrollBar
{
    background: #F0F0F0;
}

QScrollBar:horizontal
{
    height: 16px;
    padding-left: 16px;
    padding-right: 16px;
}

QScrollBar:vertical
{
    width: 16px;
    padding-top: 16px;
    padding-bottom: 16px;
}

QScrollBar::handle
{
    background: #CDCDCD;
}

QScrollBar::handle:hover
{
    background: #A6A4A4;
}

QScrollBar::handle:pressed
{
    background: #808080;
}

QScrollBar::handle:vertical
{
    min-height: 40px;
    margin-left: 2px;
    margin-right: 2px;
}

QScrollBar::handle:horizontal
{
    min-height: 40px;
    margin-top: 2px;
    margin-bottom: 2px;
}

QScrollBar::add-line:horizontal
{
    width: 16px;
    image: url(:/QScrollBar/Resources/QScrollBar/addLineH.png);
    subcontrol-position: right;
    subcontrol-origin: margin;
}

QScrollBar::add-line:horizontal:hover
{
    image: url(:/QScrollBar/Resources/QScrollBar/addLineH-hover.png);
}

QScrollBar::add-line:horizontal:pressed
{
    image: url(:/QScrollBar/Resources/QScrollBar/addLineH-pressed.png);
}

QScrollBar::sub-line:horizontal
{
    width: 16px;
    image: url(:/QScrollBar/Resources/QScrollBar/subLineH.png);
    subcontrol-position: left;
    subcontrol-origin: margin;
}

QScrollBar::sub-line:horizontal:hover
{
    image: url(:/QScrollBar/Resources/QScrollBar/subLineH-hover.png);
}

QScrollBar::sub-line:horizontal:pressed
{
    image: url(:/QScrollBar/Resources/QScrollBar/subLineH-pressed.png);
}

QScrollBar::sub-line:vertical
{
    height: 16px;
    image: url(:/QScrollBar/Resources/QScrollBar/addLineV.png);
    subcontrol-position: top;
    subcontrol-origin: margin;
}

QScrollBar::sub-line:vertical:hover
{
    image: url(:/QScrollBar/Resources/QScrollBar/addLineV-hover.png);
}

QScrollBar::sub-line:vertical:pressed
{
    image: url(:/QScrollBar/Resources/QScrollBar/addLineV-pressed.png);
}

QScrollBar::add-line:vertical
{
    height: 16px;
    image: url(:/QScrollBar/Resources/QScrollBar/subLineV.png);
    subcontrol-position: bottom;
    subcontrol-origin: margin;
}

QScrollBar::add-line:vertical:hover
{
    image: url(:/QScrollBar/Resources/QScrollBar/subLineV-hover.png);
}

QScrollBar::add-line:vertical:pressed
{
    image: url(:/QScrollBar/Resources/QScrollBar/subLineV-pressed.png);
}

QScrollBar::add-page, QScrollBar::sub-page
{
    background: #F0F0F0;
}

/**********************************QTableView*************************************/

QTableView
{
    qproperty-alternatingRowColors: true;
    qproperty-showGrid: false;
    background: white;
    alternate-background-color: #F7F7F7;
}

QTableView::item:hover
{
    background: #CBE5FF;
}

QTableView::item:selected
{
    background: #55aaff;
    color: white;
}

/******************************QRadioButton************************************/

QRadioButton::indicator
{
    width: 12px;
    height: 12px;
}

QRadioButton::indicator::unchecked
{
    image: url(:/QRadioButton/Resources/QRadioButton/radiobutton-unchecked.png);
}

QRadioButton::indicator::unchecked:hover
{
    image: url(:/QRadioButton/Resources/QRadioButton/radiobutton-unchecked-hover.png);
}

QRadioButton::indicator::unchecked:pressed
{
    image: url(:/QRadioButton/Resources/QRadioButton/radiobutton-unchecked-pressed.png);
}

QRadioButton::indicator::unchecked:disabled
{
    image: url(:/QRadioButton/Resources/QRadioButton/radiobutton-unchecked-disabled.png);
}

QRadioButton::indicator::checked
{
    image: url(:/QRadioButton/Resources/QRadioButton/radiobutton-checked.png);
}

QRadioButton::indicator::checked:hover
{
    image: url(:/QRadioButton/Resources/QRadioButton/radiobutton-checked-hover.png);
}

QRadioButton::indicator::checked:pressed
{
    image: url(:/QRadioButton/Resources/QRadioButton/radiobutton-checked-pressed.png);
}

QRadioButton::indicator::checked:disabled
{
    image: url(:/QRadioButton/Resources/QRadioButton/radiobutton-checked-disabled.png);
}

/***************************************QCheckBox************************************************/

QCheckBox::indicator
{
    width: 12px;
    height: 12px;
}

QCheckBox::indicator::unchecked
{
    image: url(:/QCheckBox/Resources/QCheckBox/checkbox-unchecked.png);
}

QCheckBox::indicator::unchecked:hover
{
    image: url(:/QCheckBox/Resources/QCheckBox/checkbox-unchecked-hover.png);
}

QCheckBox::indicator::unchecked:pressed
{
    image: url(:/QCheckBox/Resources/QCheckBox/checkbox-unchecked-pressed.png);
}

QCheckBox::indicator::unchecked:disabled
{
    image: url(:/QCheckBox/Resources/QCheckBox/checkbox-unchecked-disabled.png);
}

QCheckBox::indicator::checked
{
    image: url(:/QCheckBox/Resources/QCheckBox/checkbox-checked.png);
}

QCheckBox::indicator::checked:hover
{
    image: url(:/QCheckBox/Resources/QCheckBox/checkbox-checked-hover.png);
}

QCheckBox::indicator::checked:pressed
{
    image: url(:/QCheckBox/Resources/QCheckBox/checkbox-checked-pressed.png);
}

QCheckBox::indicator::checked:disabled
{
    image: url(:/QCheckBox/Resources/QCheckBox/checkbox-checked-disabled.png);
}

QCheckBox::indicator::indeterminate
{
    image: url(:/QCheckBox/Resources/QCheckBox/checkbox-partiallychecked.png);
}

QCheckBox::indicator::indeterminate:hover
{
    image: url(:/QCheckBox/Resources/QCheckBox/checkbox-partiallychecked-hover.png);
}

QCheckBox::indicator::indeterminate:pressed
{
    image: url(:/QCheckBox/Resources/QCheckBox/checkbox-partiallychecked-pressed.png);
}

QCheckBox::indicator::indeterminate:disabled
{
    image: url(:/QCheckBox/Resources/QCheckBox/checkbox-partiallychecked-disabled.png);
}

/****************************QListView************************************/
QListView
{
    qproperty-alternatingRowColors: true;
    background: white;
    border: none;
    alternate-background-color: #F7F7F7;
}

QListView::item
{
    height: 24px;
}

QListView::item:hover
{
    background: #CBE5FF;
}

QListView::item:selected
{
    background: #55aaff;
    color: white;
}

/***************************QTreeView****************************/
QTreeView
{
    show-decoration-selected: 1;
    border: none;
}

QTreeView::branch
{
    background-color: transparent;
}

QTreeView::item:hover, QTreeView::branch:hover
{
    background-color: #CBE5FF;
}

QTreeView::item:selected, QTreeView::branch:selected
{ /** 鼠标选中 **/
    background-color: rgb(85, 170, 255);
    color: white;
}

QTreeView::branch:open:has-children
{
    image: url(:/QCustomUi/Resources/tree-open-light.png);
}

QTreeView::branch:open:has-children:hover
{
    image: url(:/QCustomUi/Resources/tree-open-light.png);
}

QTreeView::branch:open:has-children:selected
{
    image: url(:/QCustomUi/Resources/tree-open.png);
}

QTreeView::branch:closed:has-children
{
    image: url(:/QCustomUi/Resources/tree-close-light.png);
}

QTreeView::branch:closed:has-children:hover
{
    image: url(:/QCustomUi/Resources/tree-close-light.png);
}

QTreeView::branch:closed:has-children:selected
{
    image: url(:/QCustomUi/Resources/tree-close.png);
}

/*******************************QTextEdit*************************************/
QTextEdit
{
    border: 1px solid #999999;
}

QTextEdit:hover, QTextEdit:focus
{
    border: 1px solid #2477CE;
}

QTextEdit::disabled
{
    background: #E1E1E1;
    border: 1px solid #D2D2D2;
}

/******************************QTabWidget*************************************/
QTabWidget
{
    background: #F0F0F0;
}

QTabWidget::pane
{
    border: none;
    background: white;
}

QTabWidget QTabBar:tab
{
    padding: 5px 10px 5px 10px;
    background: #F0F0F0;
    border: none;
}

QTabWidget QTabBar::tab:hover
{
    background: #E1E1E1;
    border: none;
}

QTabWidget QTabBar::tab:selected
{
    background: #FFFFFF;
    border: none;
}

QTabBar::close-button:selected, QTabBar[hover]::close-button
{
    image: url(:/QCustomUi/Resources/close-light.png);
}

QTabBar::close-button:!selected
{
    image: none;
}

/*****************************************************************************/

/*****************************QCtmToolBox-View********************************/
.QCtmToolBox QTreeView, .QCtmToolBox QTableView, .QCtmToolBox QListView
{
    background: #F0F0F0;
}
/*****************************************************************************/

QSplitter:handle:horizontal
{
    width: 0px;
}

QSplitter:handle:vertical
{
    height: 0px;
}

QHeaderView::up-arrow
{
    subcontrol-position: center right;
    padding-right: 8px;
    image: url(:/QScrollBar/Resources/QScrollBar/addLineV.png);
}

QHeaderView::down-arrow
{
    subcontrol-position: center right;
    padding-right: 8px;
    image: url(:/QScrollBar/Resources/QScrollBar/subLineV.png);
}
